package com.czj.web.servlet;


import java.io.IOException;
import java.util.List;
import java.util.Map;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.BaseDao.BaseDao;
import com.BaseDao.BaseDaoImpl;
import com.EntityBean.Good;
import com.baseServlet.BaseServlet;


public class GoodsConsumeServlet extends BaseServlet {
	private BaseDao<Good> baseDao;
	private List<Good> goodsList;

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		this.doPost(req, resp);
	}

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		req.setAttribute("goods",goodsList);
	}

	@Override
	public void destroy() {
		// TODO Auto-generated method stub
		super.destroy();
	}

	@Override
	public void init(ServletConfig config) throws ServletException {
		baseDao=new BaseDaoImpl<Good>();
		Good goods=new Good();
		goodsList=baseDao.select(goods);
	}

	

}
